/*
 * @Autor: dingxiaolin
 * @Date: 2021-06-02 13:12:43
 * @LastEditors: dingxiaolin
 * @LastEditTime: 2021-07-21 13:38:06
 */
import { RouteRecordRaw } from 'vue-router'
import { RouterTransition } from '@/components/transition'
import { markRaw } from 'vue'

const routeName = 'demos'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/demos',
        name: routeName,
        redirect: '/demos/custom-a-custom-modal',
        component: markRaw(RouterTransition),
        meta: {
            title: 'demo演示',
            icon: 'icon-zhuomian'
        },
        children: [
            {
                path: 'custom-a-custom-modal',
                name: `${routeName}-custom-modal`,
                meta: {
                    title: '自定义模态框',
                    icon: 'icon-zhuomian',
                    keepAlive: true
                },
                component: () => import('@/views/static_view/demos/custom-modal.vue')
            },
            {
                path: 'button',
                name: `${routeName}-button`,
                meta: {
                    title: '按钮的扩展',
                    icon: 'icon-zhuomian',
                    keepAlive: true
                },
                component: () =>
                    import('@/views/static_view/demos/button.vue')
            },
            {
                path: 'form',
                name: `${routeName}-form`,
                meta: {
                    title: '验证表单',
                    icon: 'icon-zhuomian',
                    keepAlive: true
                },
                component: () =>
                    import('@/views/static_view/demos/form/rule-form.vue')
            },
            {
                path: 'icons',
                name: `${routeName}-icons`,
                meta: {
                    title: '自定义图标',
                    icon: 'icon-zhuomian',
                    keepAlive: true
                },
                component: () =>
                    import('@/views/static_view/demos/icons/Iconfont.vue')
            },
            {
                path: 'http://buqiyuan.gitee.io/vite-vue3-lowcode/',
                name: `${routeName}-lowcode`,
                component: RouterTransition,
                meta: {
                    title: 'H5低代码平台',
                    icon: 'icon-externa-link'
                }
            }
        ]
    }
]

export default routes
